import request from '@/utils/request'

export default {
  getByDate(roomID,date) {
    return request({
      url: `/main/room-time-slice/getByDate/${roomID}/${date}`,
      method: 'get'
    })
  },

  getByRoomID(roomID) {
    return request({
      url: `/main/room-time-slice/getByRoomID/${roomID}`,
      method: 'get'
    })
  },


  add(time_slice) {
    return request({
      url: `/main/room-time-slice/add`,
      method: 'post',
      data: time_slice
    })
  },
  deleteById(id){
    return request({
      url: `/main/room-time-slice/delete/${id}`,
      method: 'delete',
    })
  },
  getById(id){
    return request({
      url: `/main/room-time-slice/getById/${id}`,
      method: 'get',
    })
  },
  update(slice){
    return request({
      url: `/main/room-time-slice/update`,
      method: 'put',
      data: slice
    })
  },
}

